<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <div id="container"></div>
    <script src="/xuni/bundle.js"></script>
    <script>
        var templateStr = `
            <ul>
                {{#students}}
                    <li>
                        姓名{{name}}
                        <ol>
                            {{#hobbies}}
                                <li>{{.}}</li>
                            {{/hobbies}}
                        </ol>
                    <li>
                {{/students}}
            </ul>
        `
        var data = {
            students:[
                {name:'小明',hobbies:['游泳','滑雪']},
                {name:'小王',hobbies:['h小游戏','gal']}
            ]
        }
        // var templateStr = `hello {{somebody}}`
        // var data = {somebody:'world'}
        console.log(SSG_TemplateEngine.render(templateStr, data));
        document.getElementById('container').innerHTML = SSG_TemplateEngine.render(templateStr, data)
    </script>
</body>
</html>